<!-- 列表 -->
<extend name="Public:layout" />
<block name="title"><{$authName}></block>

<block name="pluginCSS">
<link rel="stylesheet" type="text/css" href="__PUBLIC__/Admin/plugins/select2/select2.css"/>
<link rel="stylesheet" type="text/css" href="__PUBLIC__/Admin/plugins/select2/select2-metronic.css"/>
</block>
<block name="CSS"></block>

<block name="loadJS">
<script type="text/javascript" src="__PUBLIC__/Admin/plugins/select2/select2.min.js"></script>
<script src="__PUBLIC__/admin/scripts/layer/layer.js" type="text/javascript"></script>	


</block>
<block name="setJS">
<script>
var ajaxUrl="<{:U('index')}>";
</script>
</block>
<block name="initJS">
$('#searchNum').change(function(){
	var pageSize= $(this).val();
	location.href="<{:U('refund')}>?pageSize="+pageSize;
});
</block>

<block name="pagetitle">增删改查</block>
<block name="page">
<div class="row">
	<div class="col-md-12">

		<div class="portlet">
			<div class="portlet-title">
				<div class="caption">
					<i class="fa <{$authIco}>"></i><{$authName}>
				</div>
				
				<!-- <div class="actions">
					<a class="btn default green-stripe" id="table_common_new" data-toggle="modal" href="#">
						<i class="fa fa-plus"></i>
						<span class="hidden-480">管理订单</span>
					</a>
				</div> -->
				
			</div>
			<div class="portlet-body">

			<label>
				   <select class="form-control" name="searchNum" id="searchNum">
				   <if condition="$PQ['pageSize'] eq 1">selected</if>
				   <option <if condition="$PQ['pageSize'] eq 5">selected</if> value="5">每页显示5条记录</option>
				   <option <if condition="$PQ['pageSize'] eq 15">selected</if> value="15">每页显示15条记录</option>
				   <option <if condition="$PQ['pageSize'] eq 20">selected</if> value="20">每页显示20条记录</option>
				   </select>
				</label>
				<div class="pull-right">
				<form class="form-inline" role="form" action="<{:U('index')}>" method="post">
				
					<div class="form-group">
						<label class="sr-only" for="shopName">所属店铺：</label>
						<input type='text' placeholder="所属店铺" class="form-control" name='shopName' id='shopName' value='<{$shopName}>'/>
					</div>
					<div class="form-group">
						<label class="sr-only" for="orderNo">订单编号：</label>
						<input type='text' placeholder="订单编号"  class="form-control" name='orderNo' id='orderNo' value='<{$orderNo}>'/>
					</div>
					<div class="form-group">
						<label class="sr-only" for="isRefund">退款状态：</label>
						<select class="form-control" id='isRefund' name='isRefund'>
				             <option value='-1'>全部</option>
				             <option value='0' <if condition="$isRefund ==0 ">selected</if>>未退</option>
				             <option value='1' <if condition="$isRefund ==1 ">selected</if>>已退</option>
				         </select>
					</div>					
					<button type="submit" class="btn green">
					搜索  <i class="fa fa-search"></i>
					</button>
									
				
				</form>
				</div>
				
				<table class="table table-hover table-striped table-bordered">
           <volist name="PQ['list']" id="vo" key='key'>
           <thead>
             <tr>
               <th colspan='5'><{$key}>.订单：<span class="text-danger"><{$vo['orderNo']}></span><span style='margin-left:100px;'><a href="<{:U('refund',array('shopName'=>$vo['shopName']))}>"><i class="fa fa-truck"></i> <{$vo['shopName']}></a></span><span class="pull-right" style="font-weight:100"><i class="fa fa-calendar"></i> <{$vo['createTime']}></span></th>
             </tr>
           </thead>
           <tbody>
             <tr>
               <td>
               <div>
               <volist name="vo['goodslist']" id="goods">
				  <img style="margin:2px"src="__UPLOAD__/<{$goods['goodsImg']?$goods['goodsImg']:$COMMON.goodsImage}>" width="50" title='<{$goods['goodsName']}>'/>
			   </volist>
			   </div>
               </td>
               <td><{$vo['userName']}></td>
               <td><span class="text-danger"><strong>&yen;<{$vo['totalMoney']+$vo['deliverMoney']}></strong></span><br/>
               <if condition="$vo['payType'] ==1 ">在线支付<else/>货到付款</if>
               </td>
               <td style="text-align:center">
				<if condition="$vo['isRefund'] ==1 "><span class="btn btn-xs default">已退款</span><else/><span class="btn btn-xs red">未退款</span></if>
               </td>
               <td  style="text-align:center"><a class="view btn btn-xs default" href="<{:U('view',array('id'=>$vo['orderId']))}>"><i class="fa fa-eye"></i> 订单详情</a>
               <if condition="$vo['isRefund'] eq 0">
               <a class="view btn btn-xs red" href="<{:U('getRefund',array('id'=>$vo['orderId']))}>"><i class="fa fa-reply"></i> 退款</a></if>
               </td>
             </tr>
             </volist>
             
           </tbody>
        </table>
		<{$PQ['page']}>
        </div>
		</div>
	</div>
</div>
</block>